<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>系统上线计时</title>
		<link rel="stylesheet" href="./accumulative.css" />
		<script src="./accumulative.js"></script>
		<script>
			window.onload = function() {
				//系统上线时间戳：2020-03-01 00:00:00->1582992000000
				window.systemOnlineTimestamp = 1554449245000;
				//系统当前时间戳，这个时间可以在页面加载完成后去服务器端获取
				window.currentTimestamp = new Date().getTime();
				setInterval("accumulative()", 1000);
			}
		</script>
	</head>
	<body>
		<div class="accumulative-div">
			<i>当前系统已上线运行</i>
			<div class="accumulative-div">
				<span class="accumulative-red">
					<p id="y1">0</p>
					<p>年</p>
				</span>
				<span class="accumulative-yg">
					<p id="d1">0</p>
					<p>天</p>
				</span>
				<span class="accumulative-or">
					<p id="h1">0</p>
					<p>时</p>
				</span>
				<span class="pi">
					<p id="i1">0</p>
					<p>分</p>
				</span>
				<span class="pk">
					<p id="s1">0</p>
					<p>秒</p>
				</span>
			</div>
		</div>
	</body>
</html>
